import React, { lazy } from 'react'

const Home = lazy(() => import('../page/Home'));
const Login = lazy(() => import('../page/Login'));

const Layout = lazy(() => import('../layout'))

const My = lazy(() => import('../page/My'))

export const menuList = [
    {
        path: '/home/my',
        element: <My />,
        title: '用户信息管理'
    }
]

const routes = [
    {
        from: '/',
        to: '/home'
    },
    {
        path: '/',
        element: <Layout />,
        children: [
            {
                path: '/home',
                element: <Home />,
                children: menuList
            },
            {
                path: '/login',
                element: <Login />
            },
        ]
    },
]

export default routes